﻿/**
 * 
 * @file MaterialDescriptionEditWidget.h
 * @brief 材料描述对话框
 * @author BaGuijun (baguijun@163.com)
 * @date 2024-04-07
 * 
 */
#ifndef MaterialDescriptionEditWidget_H
#define MaterialDescriptionEditWidget_H

#include "GUIPropertyDialogAPI.h"
#include "GUIWidget/GUIDialogBase.h"
#include "GUIWidget/GUIWidgetBase.h"

namespace Ui {
class MaterialDescriptionEditWidget;
}

namespace GUI {
class GUIPropertyDialogAPI MaterialDescriptionEditWidget : public GUIWidgetBase
{
    Q_OBJECT
public:
    /**
     * @brief Construct a new Material Description Edit Dialog object
     * @param[i]  mw             主窗口
     * @param[i]  name           名称
     * @param[i]  desc           描述
     * @author BaGuijun (baguijun@163.com)
     * @date 2024-04-07
     */
    explicit MaterialDescriptionEditWidget(MainWindow *mw, QString name, QString desc);
    /**
     * @brief Destroy the Material Description Edit Dialog object
     * @author BaGuijun (baguijun@163.com)
     * @date 2024-04-07
     */
    ~MaterialDescriptionEditWidget();
    /**
     * @brief 获取描述文本
     * @return QString 描述文文本
     * @author BaGuijun (baguijun@163.com)
     * @date 2024-04-07
     */
    QString getDescText() const;
private slots:
    /**
     * @brief ok按钮点击
     * @author BaGuijun (baguijun@163.com)
     * @date 2024-04-07
     */
    void on_pb_ok_clicked();
    /**
     * @brief cancel按钮点击
     * @author BaGuijun (baguijun@163.com)
     * @date 2024-04-07
     */
    void on_pb_cancel_clicked();
private:
    /**
     * @brief ui
     * @author BaGuijun (baguijun@163.com)
     * @date 2024-04-07
     */
    Ui::MaterialDescriptionEditWidget *_ui{};
    /**
     * @brief 描述文本
     * @author BaGuijun (baguijun@163.com)
     * @date 2024-04-07
     */
    QString _text{};
};
}

#endif // MaterialDescriptionEditWidget_H
